export function isBlank(value) {
    if (!value) {
        return true;
    }
    return value.trim().length === 0;
}

export function isNotBlank(value) {
    return !isBlank(value);
}

export function subString(str, {length = 10, ellipsis = true} = {}) {
    if (!str || typeof str !== 'string') {
        return '';
    }
    if (str.length <= length) {
        return str;
    }
    str = str.substring(0, length);
    return ellipsis ? `${str}...` : str;
}
